package ui;
import feffects.easing.Quad;
import feffects.easing.Quint;
import js.Lib;
import tools.ASprite;
import ui.nav.Nav;

/**
 * ...
 * @author PRASS
 */

class Header extends ASprite
{
	private var _nav 	: Nav;
	private var _shadow	: JQuery;
	
	public function new(  ) 
	{
		super(new JQuery("header"));
		
		_nav 	= new Nav(Lib.document.getElementById("#navigation"), new JQuery("#navigation"));
		_shadow	= new JQuery("#shadow");
				
		var posx : Int = cast ( ( 216 - 103 ) * .5 );
		_nav.setX( posx );
		visible(true);
	}
	
	public function display() : Void
	{
		//tweens( [ { prop:setX, init: -216, value:0 } ], 1000, , null, 300);
		tween( -216, setX, 0, 1000, Quint.easeOut, null, 300);
	}

	
	public function resize( _h : Int) : Void
	{
		setHeight(_h);
		_nav.setY( 100 );
		
		var _y : Int = cast ( ( _h - 724 ) * .5 );
		
		_shadow.css("top", _y + "px");
	}
	
}